﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using djpp.DomainModel;
using djpp.gui;

namespace djpp
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            InitializeCustomComponent();
        }

        private void InitializeCustomComponent()
        {
            var repo = new ProjectRepo();

            var menu = new ContextMenu();
            foreach (var command in repo.Commands)
            {
                var menuItem = new MenuItemEx(command);
                menu.MenuItems.Add(menuItem);
            }
            repoTree.ContextMenu = menu;
            
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
   
    }
}
